package com.gsta.cdn.cdr.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.gsta.cdn.cdr.entity.ChannelConcurrent;
import com.gsta.cdn.cdr.mapper.ConcurrentHotMapper;
import com.gsta.cdn.cdr.service.ConcurrentHotService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ConcurrentHotServiceImpl extends ServiceImpl<ConcurrentHotMapper, ChannelConcurrent> implements ConcurrentHotService {

    @Override
    public List<Map<String, Object>> ConcurrentHotHotNum(String date, String percent) {
        return baseMapper.ConcurrentHotHotNum(date,percent);
    }

    @Override
    public List<Map<String, Object>> ConcurrentHotData(String date, String percent, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.ConcurrentHotData(date,percent,page,pageSize);
    }

    @Override
    public List<Map<String, Object>> ConcurrentHotArea(String date, String percent) {
        return baseMapper.ConcurrentHotArea(date,percent);
    }

    @Override
    public List<Map<String, Object>> ConcurrentHotAreaPopName(String date, String percent, String area) {
        return baseMapper.ConcurrentHotAreaPopName(date,percent,area);
    }

    @Override
    public List<Map<String, Object>> ConcurrentHotByAreaPopName(String date, String area, String popName, String percent, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.ConcurrentHotByAreaPopName(date,area,popName,percent,page,pageSize);
    }

    @Override
    public List<Map<String, Object>> ConcurrentHotByArea(String date, String area, String percent, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.ConcurrentHotByArea(date,area,percent,page,pageSize);
    }

    @Override
    public List<Map<String, Object>> ConcurrentHotByPopName(String date, String popName, String percent, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.ConcurrentHotByPopName(date,popName,percent,page,pageSize);
    }
}
